Skip to content

Port over some baselined hover/quick info tests #1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 30, 2025

Conversation

DanielRosenwasser
Copy link
Member

This change ports over fourslash tests for quick info.

Things are definitely not apples-to-apples given that hovers don't use display parts like quick info did. I did not do a very thorough diff, but some notable differences I picked up on:

  • No returned ranges for which the current hover continues to be valid
  • Some missing trailing JSDoc tags, or cases where @see/@link doesn't process text the same.
  • @inheritdoc doesn't work
  • Hover on keywords like this, class, and default (like an export default) are both not working
  • Changes in descriptors (we used to say "getter" or "setter" and now we say "accessor")
image image image

There are only a few new failing tests, that I believe fail with something like the following:

Unexpected response type for quick info request: <nil>

@Copilot Copilot AI review requested due to automatic review settings July 29, 2025 22:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ports over fourslash tests for hover/quick info functionality from the original TypeScript test suite. The tests validate hover information displayed when users hover over various language constructs including classes, enums, functions, interfaces, modules, and variables.

Key Changes

  • Ported baseline test files that establish expected hover output for different TypeScript language features
  • Tests cover a comprehensive range of hover scenarios: class members, function overloads, enum members, module aliases, and variable declarations
  • Added JSON output format that captures both the hover content and position information for each test marker

@DanielRosenwasser
Copy link
Member Author

DanielRosenwasser commented Jul 30, 2025

Also, I think these baselines are going in different directories than before - I hope that's fine?

result = strings.Split(*item.Contents.String, "\n")
}
if item.Contents.MarkedStringWithLanguage != nil {
result = appendLinesForMarkedStringWithLanguage(result, item.Contents.MarkedStringWithLanguage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need this, I think this has been deprecated, but I guess it's fine to have it.

@DanielRosenwasser DanielRosenwasser added this pull request to the merge queue Jul 30, 2025
Merged via the queue into main with commit e68e226 Jul 30, 2025
22 checks passed
@DanielRosenwasser DanielRosenwasser deleted the baselineQuickInfoHover branch July 30, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants